package org.lionel.clazz;

public class Demo {
    private static int getStepNum(int n) {
        if (n < 0) {
            return 0;
        }
        if (n == 0 || n == 1 || n == 2) {
            return n;
        }
        if (n > 2) {
            return getStepNum(n - 1) + getStepNum(n - 2);
        }
        return 0;
    }

    public static void main(String[] args) {
        System.out.println(getStepNum(3));
    }
}
